package com.shengde.jinwawaforleader.model.myJob.onlineEducation;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.shengde.jinwawaforleader.R;
import com.shengde.jinwawaforleader.base.BaseActivity;

/**
 * @author 鞠永强
 * @version $Rev$
 * @time 2017/2/22 0022 11:08
 * @des ${在线教育}
 * @updateAuthor $Author$
 * @updateDate $Date$
 * @updateDes ${TODO}
 */

public class OnlineEducationActivity extends BaseActivity{
    private RelativeLayout relativelayout_school_myself;
    private RelativeLayout relativelayout_public_source;
    private TextView tv_back;
    private TextView tv_title;
    private TextView fill_add;

    @Override
    public void onRoot(Bundle savedInstanceState) {
        setContentView(R.layout.activity_online_eduction);
    }

    @Override
    public void initView() {
        relativelayout_school_myself = (RelativeLayout) findViewById(R.id.relativelayout_school_myself);
        relativelayout_public_source = (RelativeLayout) findViewById(R.id.relativelayout_public_source);
        tv_back = (TextView) findViewById(R.id.tv_back);
        tv_title = (TextView) findViewById(R.id.tv_title);
        fill_add = (TextView) findViewById(R.id.fill_add);

    }

    @Override
    public void initData() {
        tv_title.setText(getString(R.string.online_education));
    }

    @Override
    public void initListener() {
        tv_back.setOnClickListener(this);
        relativelayout_school_myself.setOnClickListener(this);
        relativelayout_public_source.setOnClickListener(this);
    }

    @Override
    public void onWidgetClick(View view) {
        switch (view.getId()) {
            case R.id.relativelayout_public_source:
                Intent intent = new Intent(this,PublicSourceActivity.class);
                intent.putExtra("type","1");
                startActivity(intent);
                break;
            case R.id.relativelayout_school_myself:
                intent = new Intent(this,PublicSourceActivity.class);
                intent.putExtra("type","2");
                startActivity(intent);
                break;
            case R.id.tv_back:
                finish();
                break;
            default:
                break;
        }
    }
}
